<?php /* Template_ 2.2.4 2011/07/06 09:55:16 E:\PHP\www\sagapo\_DATA\template_\default\admin\board\index.html 000003625 */ 
$TPL_list_1=empty($TPL_VAR["list"])||!is_array($TPL_VAR["list"])?0:count($TPL_VAR["list"]);?>
<h2 class="<?php echo $TPL_VAR["module"]?>">
	게시판 관리
	<button type="button" class="add" onclick="move('<?php echo $TPL_VAR["CFG"]->PATH->WWWADMIN?>/<?php echo $TPL_VAR["module"]?>/add')">추가</button>
</h2>
<section class="default">
	<script>
		$(function() {
			$(".table_delete").click(function(){
				if(!confirm("정말로 삭제하시겠습니까?")) return false;
			});
			
		});
	</script>
	<table class="table">
		<caption>
			게시판 관리
		</caption>
		<colgroup>
			<col class="t_chk" />
			<col class="t_board_id" />
			<col />
			<col class="t_board_count" />
			<col class="t_date" />
			<col class="t_board_category" />
			<col class="t_etc" />
		</colgroup>
		<thead>
			<tr>
				<th scope="col"><input type="checkbox" name="chk[]" /></th>
				<th scope="col">게시판 아이디</th>
				<th scope="col">게시판명</th>
				<th scope="col">게시물수</th>
				<th scope="col">생성일</th>
				<th scope="col">카테고리</th>
				<th scope="col">비고</th>
			</tr>
		</thead>
		<tbody>
<?php if($TPL_VAR["list"]){?>
<?php if($TPL_list_1){foreach($TPL_VAR["list"] as $TPL_V1){?>
			<tr>
				<td class="txt_center"><input type="checkbox" name="chk[]" /></td>
				<td>
					<a href="/board/bbs/<?php echo $TPL_V1->ba_id?>" target="_blank"><?php echo $TPL_V1->ba_id?></a>
				</td>
				<td><a href="view/<?php echo $TPL_V1->ba_id?>"><?php echo $TPL_V1->ba_name?></a></td>
				<td class="txt_center"><?php echo $TPL_V1->ba_count?></td>
				<td class="txt_center"><?php echo $TPL_V1->date?></td>
				<td class="txt_center">
<?php if($TPL_V1->ba_category){?>
					<button type="button" class="category" onclick="move('category/<?php echo $TPL_V1->ba_id?>')">카테고리설정</button>
<?php }else{?>
					&nbsp;
<?php }?>
				</td>
				<td class="txt_center">
					<a href="modify/<?php echo $TPL_V1->ba_id?>">
						<img src="<?php echo $TPL_VAR["CFG"]->PATH->IMAGE?>/icons/pencil.png" alt="수정" />
					</a>
					&nbsp;
					<a href="doDelete/<?php echo $TPL_V1->ba_id?>">
						<img src="<?php echo $TPL_VAR["CFG"]->PATH->IMAGE?>/icons/delete.png" alt="삭제" class="table_delete" />
					</a>
				</td>
			</tr>
<?php }}?>
<?php }else{?>
			<tr>
				<td colspan="7" class="txt_center no_data">
					등록된 게시판이 없습니다. <a href="<?php echo $TPL_VAR["CFG"]->PATH->WWWADMIN?>/<?php echo $TPL_VAR["module"]?>/add" class="icon_add_btn">추가</a>
				</td>
			</tr>
<?php }?>
		</tbody>
	</table>
	
	<div class="paging">
		<ul>
<?php if($TPL_VAR["paging"]->enable_prev){?>
			<li>
				<a href="?<?php echo $TPL_VAR["start_link"]?>"> << </a>
			</li>
			<li>
				<a href="?<?php echo $TPL_VAR["prev_link"]?>"> < </a>
			</li>
<?php }?>
<?php if(is_array($TPL_R1=$TPL_VAR["paging"]->paging)&&!empty($TPL_R1)){foreach($TPL_R1 as $TPL_V1){?>
<?php if($TPL_V1["page_num"]==$TPL_VAR["paging"]->eb->p){?>
			<li>
				<strong><?php echo $TPL_V1["page_num"]?></strong>
			</li>
<?php }else{?>
			<li>
				<a href="?<?php echo $TPL_V1["page_link"]?>"><?php echo $TPL_V1["page_num"]?></a>
			</li> 
<?php }?> 
<?php }}?>
<?php if($TPL_VAR["paging"]->enable_next){?>
			<li>
				<a href="?<?php echo $TPL_VAR["next_link"]?>"> > </a>
			</li>
			<li>
				<a href="?<?php echo $TPL_VAR["end_link"]?>"> >> </a>
			</li>
<?php }?>
		</ul>
	</div>
</section>